import java.util.Scanner;

/**
 * @author yu
 * @date 2025年04月18日 10:46
 */
public class _20250412_03 {
    // 计算两点距离
    static double distance(double x1, double y1, double x2, double y2) {
        return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
    }

    // 计算三角形外接圆的圆心和半径
    static double[] circumCircle(double x1, double y1, double x2, double y2, double x3, double y3) {
        double x12 = x1 - x2;
        double x13 = x1 - x3;
        double y12 = y1 - y2;
        double y13 = y1 - y3;
        double y31 = y3 - y1;
        double y21 = y2 - y1;
        double x31 = x3 - x1;
        double x21 = x2 - x1;

        // 计算垂直平分线交点（圆心坐标）
        double m1 = (x12 * x12 + y12 * y12) / 2;
        double m2 = (x13 * x13 + y13 * y13) / 2;
        double f = (y31 * m1 - y21 * m2) / (x31 * y21 - x21 * y31);
        double g = (x31 * m1 - x21 * m2) / (x21 * y31 - x31 * y21);
        double cX = f + x1;
        double cY = g + y1;

        // 计算半径
        double r = distance(cX, cY, x1, y1);
        return new double[]{cX, cY, r};
    }

    // 计算两圆公共部分面积
    static double intersectionArea(double[] circle1, double[] circle2) {
        double x1 = circle1[0], y1 = circle1[1], r1 = circle1[2];
        double x2 = circle2[0], y2 = circle2[1], r2 = circle2[2];
        double d = distance(x1, y1, x2, y2);

        if (d >= r1 + r2) {
            return 0;
        } else if (d <= Math.abs(r1 - r2)) {
            return Math.PI * Math.min(r1 * r1, r2 * r2);
        } else {
            double cosTheta1 = (r1 * r1 + d * d - r2 * r2) / (2 * r1 * d);
            double cosTheta2 = (r2 * r2 + d * d - r1 * r1) / (2 * r2 * d);
            double theta1 = 2 * Math.acos(cosTheta1);
            double theta2 = 2 * Math.acos(cosTheta2);
            return 0.5 * r1 * r1 * (theta1 - Math.sin(theta1)) + 0.5 * r2 * r2 * (theta2 - Math.sin(theta2));
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double[] triangle1 = new double[6];
        double[] triangle2 = new double[6];
        for (int i = 0; i < 6; i++) {
            triangle1[i] = scanner.nextInt();
        }
        for (int i = 0; i < 6; i++) {
            triangle2[i] = scanner.nextInt();
        }

        double[] circle1 = circumCircle(triangle1[0], triangle1[1], triangle1[2], triangle1[3], triangle1[4], triangle1[5]);
        double[] circle2 = circumCircle(triangle2[0], triangle2[1], triangle2[2], triangle2[3], triangle2[4], triangle2[5]);

        double area = intersectionArea(circle1, circle2);
        System.out.println(area);

        scanner.close();
    }
}